/** AMENDMENTS:
 * DATE       	NAME    	VERSION     DESCRIPTION
 * --------     -----  		-------     -----------
 * 20/03/2013   Michael		1.0.0       1.EnhancedException
**/
package com.mbbmap.util;

/**
 * This Exception subclass was created to work together with the {@link com.ebpp.m2u.cus.manager.SystemLogManager} to provide
 * more details on the origin and nature of an exception.
 */

public class EnhancedException extends Exception {

	private String exceptionLocation; //Location of the exception in code in
									  //the format:
									  //<classname>_<methodName>_###
									  //where ### is a unique 3-digit number
									  //within that method.

	private String extraMessage; //Extra description of the exception

	public EnhancedException(String message) {
		super(message);
		exceptionLocation = new String("");  //default to an empty string
	}

	/**
     * gets the exception location in the code
     *
     * @return 	location of the exception in code in the format:
     *			<br>&lt;classname&gt;_&lt;methodName&gt;_###
	 *			<br>where ### is a unique 3-digit number within that method
	 */
	public String getExceptionLocation() {
		return exceptionLocation;
	}


	/**
     * sets the exception location
     *
     * @param 	location the exception location in the format &lt;classname&gt;_&lt;methodName&gt;_###
	 */
	public void setExceptionLocation(String location) {
		exceptionLocation = location;
	}

	/**
     * gets extra message provided by the developer for this exception
     *
     * @return 	the extra message
	 */
	public String getExtraMessage() {
		return extraMessage;
	}

	/**
     * sets the extra message
     *
     * @param 	message the extra message
	 */
	public void setExtraMessage(String message) {
		extraMessage = message;
	}
}
